home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / system / ffg202.zip / DEMO_BAT.ZIP / RUNTREE.BAT < prev    next >
DOS Batch File  |  1995-04-01  |  1KB  |  31 lines

  1. @echo off
  2. echo Here is a demonstration of FFG's ability to execute commands for each
  3. echo found file using the '/e' option.  In this demo FFG will search for the
  4. echo DOS program TREE.COM and execute it.  You will be prompted before the
  5. echo program is executed.
  6. echo.
  7. echo (Of course, this program is most likely in your DOS search path so you
  8. echo wouldn't need to use FFG to go find and execute it, but it is used to
  9. echo illustrate the option.)
  10. call presskey
  11. echo.
  12. echo Note the use of the /1 option to stop FFG after the first TREE.COM is found.
  13. echo.
  14. echo on
  15.   ffg *:tree.com /e /1
  16. @echo off
  17. echo.
  18. echo Done.  Press any key to continue...
  19. pause>nul
  20. cls
  21. echo Note that the last demonstration of running the TREE program attempted to
  22. echo show the tree starting from the DOS directory.  It would be more useful to
  23. echo to show it from the root directory.  We can do this with FFG by specifying
  24. echo the command line with the /e option switch.  Here's how:
  25. echo.
  26. call presskey
  27. echo on
  28. ::  Note that double %%'s are required because the DOS batch file interpreter
  29. ::  removes one of them.
  30. ffg *:tree.com /e%%N%%_\ /1
  31.